/**
 * PreparedSparePartServiceImpl.java
 * @author
 * 作者 屈甲康 
 */
package org.jackysoft.service.impl;

import java.util.Date;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jackysoft.entity.PreparedSparePart;
import org.jackysoft.entity.User;
import org.jackysoft.service.AbstractStringIdServiceImpl;
import org.jackysoft.service.PreparedSparePartService;
import org.jackysoft.util.SpringSecurityUtils;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
@Service
@Transactional
public class PreparedSparePartServiceImpl 
extends AbstractStringIdServiceImpl<PreparedSparePart>
implements PreparedSparePartService {
    /**
	 * 
	 */
	private static final long serialVersionUID = -7150407485964339842L;
	final static Log logger = LogFactory.getLog(PreparedSparePartServiceImpl.class);

	public PreparedSparePartServiceImpl(){
	    this.type = PreparedSparePart.class;
	}

	@Override
	public void create(PreparedSparePart b) throws DataAccessException {
		Assert.notNull(b);
		User notifior = SpringSecurityUtils.getCurrentUser();
		b.setCreateDate(new Date());
		b.setNotifior(notifior);
		super.create(b);
	}	
	
	
		
}